package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

/**
 * 宿舍实体类
 */
@TableName("r_room")
public class RoomBean {
    @TableId(value = "pk_roomId" ,type = IdType.AUTO)
    private Integer Id;
     //宿舍地址
    @TableField("r_address")
    private String address;
    //房间类型
    @TableField("r_type")
    private String type;
    //可容量人数
    @TableField("r_number")
    private int number;
    //已住人数
    @TableField(exist = false)
    private Integer resident;
    //状态
    @TableField("r_stat")
    private String state="正常";
    //学生集合
    @TableField(exist = false)
    private List<StudentBean> studentBeans;

    public RoomBean() {
    }

    public RoomBean(String address, String type, int number, Integer resident, String state) {
        this.address = address;
        this.type = type;
        this.number = number;
        this.resident = resident;
        this.state = state;
    }

    public Integer getId() {
        return Id;
    }

    public void setId(Integer id) {
        Id = id;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public Integer getResident() {
        return resident;
    }

    public void setResident(Integer resident) {
        this.resident = resident;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public List<StudentBean> getStudentBeans() {
        return studentBeans;
    }

    public void setStudentBeans(List<StudentBean> studentBeans) {
        this.studentBeans = studentBeans;
    }

    @Override
    public String toString() {
        return "RoomBean{" +
                "Id=" + Id +
                ", address='" + address + '\'' +
                ", type='" + type + '\'' +
                ", number=" + number +
                ", resident=" + resident +
                ", state='" + state + '\'' +
                ", studentBeans=" + studentBeans +
                '}';
    }
}
